package com.zf.zffencheng.exception;

import lombok.Getter;

/**
 * ClassName: ResultException <br/>
 * Description:  <br/>
 * date: 2021/5/8 16:33<br/>
 *
 * @author william <br/>
 */
@Getter
public class ResultException extends RuntimeException {
    private Integer code;
    private String msg;

    public ResultException(String s, Throwable ex){
        super(s, ex);
    }

    public ResultException(Integer code , String msg){
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public ResultException(Error_ error_) {
        super(error_.getMsg());
        this.msg = error_.getMsg();
        this.code = error_.getCode();
    }
}
